<div class="page-header settingheading">
  <h4>Social Media Settings</h4>
</div>
<?php
$available_providers_list = array( 
	"Facebook",
	"Twitter" ,
	"Instagram" ,
	"Youtube",
	"Tumblr",
	"Snapchat"  
);
foreach( $available_providers_list as $adapter_id )
{
	$social[$adapter_id]=unserialize($socialsetting[$adapter_id]);
	
	if(array_key_exists($adapter_id, $user_profile))
	{
	?>
	<form class="form-inline form-row" role="form">
		<div class="form-group form-gap">
			<img src="<?php echo base_url(); ?>assets/front/images/<?=$adapter_id?>.png"  alt="facebook" class="img-responsive socialsite-img"/>
		</div>
		<div class="form-group form-gap">
			<img src="<?=$user_profile[$adapter_id]->photoURL?>" height="50" width="50" alt="facebook" />
		</div>
		<div class="form-group form-gap">
			<?=$user_profile[$adapter_id]->displayName?>
		</div>
		<div class="form-group form-gap">
			<?=$user_profile[$adapter_id]->lastName?>
		</div>
		<a href="<?php echo base_url(); ?>hauth/logout/<?=$adapter_id?>" class="btn btn-default login-btn">Logout</a>
	</form>
<?php
}
else
{?>
	<form class="form-inline form-row" role="form" action="<?php echo base_url(); ?>hauth/login/<?=$adapter_id?>" method="post">
		<div class="form-group form-gap">
			<img src="<?php echo base_url(); ?>assets/front/images/<?=$adapter_id?>.png"  alt="facebook" class="img-responsive socialsite-img"/>
		</div>
		<div class="form-group form-gap">
			<input type="email" name="username" class="form-control txtbox1" placeholder="Email:" value="<?=isset($social[$adapter_id]['username'])?$social[$adapter_id]['username']:''?>">
		</div>
		<div class="form-group form-gap">
			<input type="password" name="password" class="form-control txtbox1" placeholder="Password:" value="<?=isset($social[$adapter_id]['password'])?$social[$adapter_id]['password']:''?>">
		</div>
		<button type="submit" class="btn btn-default login-btn">Login</button>
	
		<!--<a href="<?php echo base_url(); ?>hauth/login/<?=$adapter_id?>" class="btn btn-default login-btn">Login</a>-->
	</form>
<?}
}

?>

